﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Platform.ascx.cs" Inherits="Controls_Platform" %>
<%--<asp:ScriptManager ID="ScriptManager1" runat=server EnablePageMethods=true />--%>

<script type="text/javascript">

    function confirmation(platformID) {
        var err = "<%=deletecf%>";
        var answer = confirm(err);
        if (answer) {
            window.location = "Delete.aspx?platformid=" + platformID;
        }
    }
</script>
<%if (platforms.Count > 0) { %>
<table class="TableCategories">
    <thead>
        <th><%=Language["Name"]%></th>
        <th><%=Language["Description"]%></th>
        <th></th>
    </thead>
    <tbody>
        <% for (int i = 0; i < platforms.Count; i = i + 1)
           { %>
        <tr class="Even">
            <td><%=platforms[i].Name%></td>
            <td><%=platforms[i].Description%></td>
            <td class="Center">
                <a href="../Home/Platforms.aspx?platformid=<%=platforms[i].ID %>">
                    <img src="../Images/TextEdit.png" alt="Edit" width="25px" title="Edit"/>
                </a>
                <a style="padding-left:35px; " href="#" onclick="confirmation(<%=platforms[i].ID%>)">
                    <img src="../Images/DeleteRed.png" alt="Edit" width="25px" title="Delete"/>
                </a>
            </td>
        </tr>
        <%} %>
    </tbody>
</table>
<%if (platforms.Count > 20) { %>
<div id="pageNavPosition" style="padding-top: 20px; text-align:left; float: left; width: 100%;" align="center"></div>
<%} %>
<%}else{ %>
  
        <div class="mainList">
         <p>
             <%=Language["noresult"] %>
         </p>
       </div>

<%} %>
 <script type="text/javascript">

     var pager = new Pager('tablepaging', 4);
     pager.init();
     pager.showPageNav('pager', 'pageNavPosition');
     pager.showPage(1);

</script>